<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <style>
            [ng-cloak] {
                display: none;
            }
        </style>
        <script>
            
            // include angular loader, which allows the files to load in any order
            /*
            AngularJS v1.3.0
            (c) 2010-2014 Google, Inc. http://angularjs.org
            License: MIT
            */
            (function(){'use strict';function d(b){return function(){var c=arguments[0],e;e="["+(b?b+":":"")+c+"] http://errors.angularjs.org/1.3.0/"+(b?b+"/":"")+c;for(c=1;c<arguments.length;c++){e=e+(1==c?"?":"&")+"p"+(c-1)+"=";var d=encodeURIComponent,a;a=arguments[c];a="function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof a?"undefined":"string"!=typeof a?JSON.stringify(a):a;e+=d(a)}return Error(e)}}(function(b){function c(a,c,b){return a[c]||(a[c]=b())}var e=d("$injector"),n=d("ng");
            b=c(b,"angular",Object);b.$$minErr=b.$$minErr||d;return c(b,"module",function(){var a={};return function(b,d,g){if("hasOwnProperty"===b)throw n("badname","module");d&&a.hasOwnProperty(b)&&(a[b]=null);return c(a,b,function(){function a(b,d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return h}}if(!d)throw e("nomod",b);var c=[],k=[],l=[],m=a("$injector","invoke","push",k),h={_invokeQueue:c,_configBlocks:k,_runBlocks:l,requires:d,name:b,provider:a("$provide","provider"),factory:a("$provide",
            "factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:m,run:function(a){l.push(a);return this}};g&&m(g);return h})}})})(window)})(window);
            //# sourceMappingURL=lib/angular-1.3.0/angular-loader.min.js.map

            
            // include a third-party async loader library
            /*!
             * $script.js v1.3
             * https://github.com/ded/script.js
             * Copyright: @ded & @fat - Dustin Diaz, Jacob Thornton 2011
             * Follow our software http://twitter.com/dedfat
             * License: MIT
             */
            !function(a,b,c){function t(a,c){var e=b.createElement("script"),f=j;e.onload=e.onerror=e[o]=function(){e[m]&&!/^c|loade/.test(e[m])||f||(e.onload=e[o]=null,f=1,c())},e.async=1,e.src=a,d.insertBefore(e,d.firstChild)}function q(a,b){p(a,function(a){return!b(a)})}var d=b.getElementsByTagName("head")[0],e={},f={},g={},h={},i="string",j=!1,k="push",l="DOMContentLoaded",m="readyState",n="addEventListener",o="onreadystatechange",p=function(a,b){for(var c=0,d=a.length;c<d;++c)if(!b(a[c]))return j;return 1};!b[m]&&b[n]&&(b[n](l,function r(){b.removeEventListener(l,r,j),b[m]="complete"},j),b[m]="loading");var s=function(a,b,d){function o(){if(!--m){e[l]=1,j&&j();for(var a in g)p(a.split("|"),n)&&!q(g[a],n)&&(g[a]=[])}}function n(a){return a.call?a():e[a]}a=a[k]?a:[a];var i=b&&b.call,j=i?b:d,l=i?a.join(""):b,m=a.length;c(function(){q(a,function(a){h[a]?(l&&(f[l]=1),o()):(h[a]=1,l&&(f[l]=1),t(s.path?s.path+a+".js":a,o))})},0);return s};s.get=t,s.ready=function(a,b,c){a=a[k]?a:[a];var d=[];!q(a,function(a){e[a]||d[k](a)})&&p(a,function(a){return e[a]})?b():!function(a){g[a]=g[a]||[],g[a][k](b),c&&c(d)}(a.join("|"));return s};var u=a.$script;s.noConflict=function(){a.$script=u;return this},typeof module!="undefined"&&module.exports?module.exports=s:a.$script=s}(this,document,setTimeout)

            // load a

            // load all of the dependencies asynchronously.
            $script([
				'phonegap.js',
                'mobile.js',
                'lib/angular-1.3.0/angular.js',
                'lib/angular-1.3.0/angular-route.js',
                'lib/jquery-2.0.3.min.js',
                'js/tictactoe.js',
                'js/app.js',
                'js/services.js',
                'js/filters.js',
                'js/directives.js',
                'js/controllers/main.js',
                'js/controllers/game.js',
                'js/ai/Estimate.js',
                'js/ai/Game.js',
                'js/ai/Move.js',
                'js/ai/Population.js',
                'lib/jsworker.min-2.0.js',
                'lib/fastclick.js',
                'js/subscribers/fastclick.js',
                'js/subscribers/backbutton.js',
                'js/subscribers/admob.js'
            ], function() {
                $script([
                    'lib/bootstrap/js/bootstrap.min.js'    // need jquery.min.js first
                ], function() {
                    console.log('all js loaded');
                })
            });
        </script>
        <title>TicTacToe App</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <!-- Bootstrap -->
        <link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="css/app.css" rel="stylesheet">
    </head>
    <body ng-cloak>

        <menu></menu>
        
        <div class="container" ng-view>

        </div>
        
        <footer></footer>

        <popup id="popupQuitGameSingle" data="{{
            {
                title: 'Warning',
                info: 'Are you sure you want to give up ?',
                cancelBtnText : 'No, continue',
                okBtnText : 'Yes, leave',
                okBtnId : 'popupQuitGameSingleId',
                okBtnClass : 'danger'
            } 
        }}">
        </popup>
    
        <popup id="popupQuitGameMulti" data="{{
            {
                title: 'Warning',
                info: 'Are you sure you want to quit this game?. Both players agree?',
                cancelBtnText : 'No, continue',
                okBtnText : 'Yes, leave',
                okBtnId : 'popupQuitGameMultiId',
                okBtnClass : 'danger'
            } 
        }}">
        </popup>
        
        <popup id="popupResetStatConfirm" data="{{
            {
                title: 'Warning',
                info: 'Are you sure you want reset all game statistic on this device?',
                cancelBtnText : 'Cancel',
                okBtnText : 'Reset',
                okBtnId : 'popupResetStatConfirmId',
                okBtnClass : 'danger'
            } 
        }}">
        </popup>
    
        <popup id="popupEndGameDialog" data="{{
            {
                title: 'Info',
                titleH: 'h2',
                info: 'Would you like to play again ? ',
                cancelBtnText : 'Back to menu',
                okBtnText : 'Play again',
                okBtnId : 'popupEndGameDialogOkId',
                okBtnClass : 'primary',
                cancelBtnClass: 'warning',
                cancelBtnId : 'popupEndGameDialogCancelId',
                infoAddId : 'popupEndGameDialogInfo'
            } 
        }}">
        </popup>
        
    </body>
</html>
